import mainLayout from "@/layouts/mainLayout.vue";

const componentsRouter = {
  name:'components',
  path:'/components',
  component: mainLayout,
  redirect: '/components/table',
  meta: {
    title: '组件',
    icon: 'component',
    role: 1,
  },
  children: [
    {
      name: '拖拽demo',
      path: '/components/draggable',
      component: () => import('@/views/components/draggable/draggableDemo'),
      meta: {
        title:'draggableDemo',
        role: 1,
      }
    },
    {
      name: 'table',
      path: '/components/table',
      component: () => import('@/views/components/table/index'),
      meta: {
        title:'table',
        role: 1,
      }
    },
    {
      name: 'table新增包含类型',
      path: '/components/tableType',
      component: () => import('@/views/components/tableType/index'),
      meta: {
        title:'tableType',
        role: 1,
      }
    },
    {
      name: 'form',
      path: '/components/form',
      component: () => import('@/views/components/form/index'),
      meta: { title: '表单页', role: 1 }
    },
    {
      name: 'loading',
      path: '/components/loading',
      component: () => import('@/views/components/loading/index'),
      meta: { title: 'Loading', role: 2 }
    },
    {
      name: 'uploadExcel',
      path: '/components/uploadExcel',
      component: () => import('@/views/components/uploadExcel'),
      meta: { title: '上传Excel', role: 3 }
    },
    {
      name: 'checkboxDemo',
      path: '/components/checkboxDemo',
      component: () => import('@/views/components/checkboxDemo'),
      meta: { title: 'checkBox', role: 3 }
    },
    {
      name: 'checkboxTwo',
      path: '/components/checkBoxTwo',
      component: () => import('@/views/components/checkBoxTwo'),
      meta: { title: 'checkBoxTwo', role: 3 }
    },
    // {
    //   name: '拖拽组件',
    //   path: '/components/draggable',
    //   component: () => import('@/views/components/draggable'),
    //   meta: { title: 'draggable', role: 3 }
    // },



  ]

}
export default componentsRouter;